package IOtest;
import java.io.FileInputStream;
public class test2 {
    public static void main(String[] args) throws Exception {
        //创建字节输入流并指定源文件名称
        FileInputStream in =new FileInputStream("C:\\Users\\W\\Desktop\\JavaCode0ofIDEA\\IOtest\\file\\test01.txt");
        int len;//用于记录每次读取的字节数
        byte[] bytes=new byte[7];
        //循环读取
        while((len=in.read(bytes))!=-1){
            System.out.println(new String (bytes,0,len));
        }
        in.close();
    }
}
